package com.doit.day04

object MapDemo {
  def main(args: Array[String]): Unit = {
/*    Map("zss" -> 18,"lss" -> 20)

    val map: Map[String, Int] = Map(("zss", 18), ("lss", 20))


    val maybeInt: Option[Int] = map.get("zss1")
    //就只有两个元素   int   null
    if (maybeInt.isEmpty){
      val value: Int = maybeInt.get
    }


    val value: Int = map.getOrElse("zss", 0)



    val ints: Array[Int] = Array(1, 2, 3, 4)*/

   val str =  "Toy Story (1995)"
   /* val strings: Array[String] = str.split("\\|")
    for (elem <- strings.toList) {
      println(elem)
    }*/

    println(str.substring(str.length - 5, str.length - 1))



  }

}
